import React, {Component} from "react"
import {TouchableHighlight, Text, StyleSheet, ViewStyle} from "react-native";
interface IProps{
    textColor?:string
    children:any
    style?:ViewStyle | any | undefined
}
class Button extends Component<IProps>{
    public props:IProps = {
        textColor:"#333",
        children:undefined,
    };

    render():any{
        let {children,textColor,style} = this.props;
        return (
            <TouchableHighlight style={[style]}>
                <Text style={{color:textColor}}>{children}</Text>
            </TouchableHighlight>
        );
    }
}

const styles = StyleSheet.create({
    button:{
        textAlign:"center",
        width:100,
        height:40,
        lineHeight:40,
        backgroundColor:"white",
        borderRadius:10,
        borderWidth:1,
        borderColor:"#eee"
    }
})
export default Button;
